<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link href="./lib/qunit.css" rel="stylesheet" />
    <script src="../src/es5plus-shim-partial.js"></script>
    <script src="../src/es5-css-selector-partial.js"></script>
</head>
<body>
    <h1 id="qunit-header">QUnit/es5-shim-partial Test</h1>
    <h2 id="qunit-banner"></h2>
    <div id="qunit-testrunner-toolbar"></div>
    <h2 id="qunit-userAgent"></h2>
    <ol id="qunit-tests"></ol>
    <div id="qunit-fixture">test markup</div>
    <form>
        <input type="text" name="abc"/>
        <input type="button" name="abc"/>
        <input type="text" id="abc"/>
        <input type="text" id="dd"/>
        <span/>
        <div class="d" id="ddd">
            <div id="sd" class="ddd">
                <input type="text"/>
                <form id="sd">
                    <input type="text"/>
                </form>
            </div>
        </div>
    </form>
    <script src="./lib/qunit.js"></script>

   
    <script type="text/javascript">
       test("tokenize", function(){
            deepEqual(tokenize('#id1'), [{matcher: ["#id1", "id1"], type: 'ID', value: 'id1'}], 'extracts ID string');
            deepEqual(tokenize('.cls1'), [{matcher: [".cls1", "cls1"], type: 'CLS', value: 'cls1'}], 'extracts CLASS string');
            deepEqual(tokenize('div'), [{matcher: ["div", "div"], type: 'TAG', value: 'div'}], 'extracts TAG string');
            deepEqual(tokenize('div span'), [{matcher: ["div", "div"], type: 'TAG', value: 'div'},{matcher: [" ", " "], type: ' ', value: ' '}, {matcher: ["span", "span"], type: 'TAG', value: 'span'}], 'extracts TAG string');
            deepEqual(tokenize('div + span'), [{matcher: ["div", "div"], type: 'TAG', value: 'div'},{matcher: [" + ", "+"], type: '+', value: '+'}, {matcher: ["span", "span"], type: 'TAG', value: 'span'}], 'extracts TAG string');
            deepEqual(tokenize('div > span'), [{matcher: ["div", "div"], type: 'TAG', value: 'div'},{matcher: [" > ", ">"], type: '>', value: '>'}, {matcher: ["span", "span"], type: 'TAG', value: 'span'}], 'extracts TAG string');
            deepEqual(tokenize('div ~ span'), [{matcher: ["div", "div"], type: 'TAG', value: 'div'},{matcher: [" ~ ", "~"], type: '~', value: '~'}, {matcher: ["span", "span"], type: 'TAG', value: 'span'}], 'extracts TAG string');
            deepEqual(tokenize('div:eq(1)'), [{matcher: ["div", "div"], type: 'TAG', value: 'div'},{matcher: [":eq(1)", "eq", "1"], type: 'eq', value: 'eq'}], 'extracts PSEDUO string');
             deepEqual(tokenize('div ~ span:contains(12)'), [{matcher: ["div", "div"], type: 'TAG', value: 'div'},{matcher: [" ~ ", "~"], type: '~', value: '~'}, {matcher: ["span", "span"], type: 'TAG', value: 'span'},{matcher: [":contains(12)", "contains", "12"], type: 'contains', value: 'contains'}], 'extracts TAG string');
       });
    </script>
</body>
</html>